import React, { FC } from 'react';
import { View, Text } from '@tarojs/components';
import { Button } from 'antd-mobile';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
export interface IProps extends ICompProps {
    /**取消 */
    canCel: Function;
    /**确认 */
    confirm: Function;
}
OPerationButton.defaultProps = {
    /**取消 */
    canCel: () => {},
    /**确认 */
    confirm: () => {},
} as Partial<IProps>;
function OPerationButton(props: IProps) {
    const { className, style, canCel, confirm } = props;
    const localClassName = useClassName('OPerationButton', className);
    return (
        <RootView className={localClassName} style={style}>
            <View className="btn_wrap">
                <Button className="btn cancelBtn" onClick={() => canCel()}>
                    取消
                </Button>
                <Button className="btn conforim" color="primary" onClick={() => confirm()}>
                    确定
                </Button>
            </View>
        </RootView>
    );
}
export default React.memo(OPerationButton as FC<IProps>);
const RootView = styled(View)`
    &.OPerationButton {
        .btn_wrap {
            display: flex;
            justify-content: space-around;
            .btn {
                width: 30%;
                height: 80px;
                font-size: 30px;
            }
            .cancelBtn {
                background-color: #f5f5f5;
            }
        }
    }
`;
